﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DigitalImage.softLib.stages {
    class CCTBmean :IColorToBinary {
        public byte[,] transform(System.Drawing.Bitmap inputImage) {
            byte[,] slika = CImageUtil.bitmapToByteMatrix(inputImage);
            double threshold = CImageUtil.mean(slika);
            slika = CImageUtil.matrixToBinary(slika, (byte)threshold);
            return slika;
        }
    }
}
